Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code4rena deploy #139

Merged
merged 114 commits into from
Jul 16, 2024
Merged

Code4rena deploy #139

merged 114 commits into from
Jul 16, 2024

Conversation

aviggiano
Copy link
Contributor

@aviggiano aviggiano commented Jul 5, 2024

This is a deployment branch with preliminary Code4rena fixes

… with dust limit when amount represents cash
* c4-001 Wrong decimal conversion in liquidation protocol split (#118)

* c4-002 Wrong crLiquidation cap in overdue liquidation (#119)

* c4-003 Wrong fragmentationFee check in Compensate means it is never charged (#120)

* c4-004 Chainlink heartbeats are different on Base and Ethereum mainnet (#123)

* c4-004 Chainlink heartbeats are different on Base and Ethereum mainnet

* Remove old code

* Add base and mainnet parameters

* Add base sequencer uptime

* c4-005 Users below crOpening cannot withdraw cash (#124)

* c4-006 DoS in market orders due to incorrect params.amount comparison… (#125)

* c4-006 DoS in market orders due to incorrect params.amount comparison with dust limit when amount represents cash

* Remove params.amount > credit comparison

* c4-007 Supply caps can be bypassed due to incorrect balanceOf (#126)

* c4-008 Variable Pool liquidity check should validate balance of aToken, not Pool (#127)

* c4-010 Compensate is prevented if user is underwater (#129)

* c4-010 Compensate is prevented if user is underwater

* Add missing import

* Remove old code

* c4-011 Compensate ignores forSale after credit split (#130)

* c4-012 getCreditPositionProRataAssignedCollateral can be simplified to totalCollateral * credit / totalDebt (#131)

* c4-013 Liquidate does not have deadline protection (#132)

* c4-013 Liquidate does not have deadline protection

* Remove duplicate check

* c4-014 BuyCreditMarket returns incorrect value for liquidity check (#133)

* c4-015 SelfLiquidation check can be simplified (#134)

* c-015 SelfLiquidation check can be simplified

* Remove unused error

* c4-016 Documentation fixes (#135)

* c4-016 Documentation fixes

* Minor documentation/error fixes

* Improve docs for swap fee

* c4-009 Variable Pool liquidity check can be bypassed with a sandwitch attack (#128)

* c4-017 BorrowOffers do not have a maxDueDate (#136)

* c4-017 BorrowOffers do not have a maxDueDate

* Add maxDueDate to LiquidateWithReplacement

* Create validateLimitOrder function

* pure -> view

* c4-018 Wrong fee calculation in SellCreditMarket + exactAmountOut (#137)

* c4-019 Refactor fee calculation in AccountingLibrary.getCashAmountOut (#138)

* c4-019 Refactor fee calculation in AccountingLibrary.getCashAmountOut

* Validate WETH

* Chainlink sequencer feed returns startedAt 0 if down (#140)

* c4-021 Add borrower to RepayStruct to avoid MEV (#141)

* c4-021 Add borrower to RepayStruct to avoid MEV

* Fix typo
@aviggiano aviggiano changed the title Code4rena deploy (WIP) Code4rena deploy Jul 15, 2024
@aviggiano aviggiano merged commit d1ed037 into main Jul 16, 2024
10 checks passed
@aviggiano aviggiano deleted the code4rena-deploy branch July 16, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant